<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFinancialIncomingProjectsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('financial_incoming_project', function(Blueprint $table)
		{
			$table->increments('id');
			$table->timestamps();
			//关联tyw_financial_incoming
			$table->integer('incoming_id');
			//double 出售、处置部门或被投资单位所得收益
			$table->double('sell_earn',13,2);
			//double 自然灾害发生的损失
			$table->double('nature_loss',13,2);
			//double 会计政策变更增加(或减少)利润总额
			$table->double('accounting_policy_earn',13,2);
			//double 会计估计变更增加(或减少)利润总额
			$table->double('accouting_estimate_earn',13,2);
			//double 俩务重组损失
			$table->double('debt_regroup_loss',13,2);
			//double 其它
			$table->double('other',13,2);
			//tinyint 2    0为本年累计数 1为上年实际数
			$table->tinyInteger('type');

			$table->softDeletes();

		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('financial_incoming_projects');
	}

}
